#pragma once
#include "GameActor.h"
#include "Struct.h"
#include "3dLib/Renderer.h" // RPTriFace
class CRagEffect;
class CTexture;


struct PrimSegment
{
	/* this+  0 */ vector3d pos;
	/* this+ 12 */ vector3d segPos[4];
	/* this+ 60 */ float radius;
	/* this+ 64 */ float size;
	/* this+ 68 */ float longitude;
	/* this+ 72 */ matrix mat;
	/* this+120 */ int red;
	/* this+124 */ int green;
	/* this+128 */ int blue;
	/* this+132 */ float alpha;
	/* this+136 */ unsigned long argb;
};


struct TeiEffect
{
	/* this+  0 */ char life;
	/* this+  2 */ short full_display_angle;
	/* this+  4 */ float max_height;
	/* this+  8 */ int process;
	/* this+ 12 */ short RotStart;
	/* this+ 14 */ short alphaB;
	/* this+ 16 */ short alphaT;
	/* this+ 20 */ float height[21];
	/* this+104 */ short rise_angle;
	/* this+108 */ float distance;
	/* this+112 */ char flag1[21];
	/* this+136 */ vector3d vecB_now;
	/* this+148 */ vector3d vecT_now;
	/* this+160 */ vector3d vecB_pre;
	/* this+172 */ vector3d vecT_pre;
};


class CEffectPrim : public CRenderObject
{
	/* this+0x0    */ public: //CRenderObject baseclass_0;
	/* this+0xCC   */ public: int m_isChangeProcessed;
	/* this+0xD0   */ private: CRagEffect* m_master;
	/* this+0xD4   */ private: CTexture** m_texture;
	/* this+0xD8   */ private: char* m_playWaveName;
	/* this+0xDC   */ private: int m_isHit;
	/* this+0xE0   */ private: int m_chSpeed;
	/* this+0xE4   */ private: int m_AlphaShow;
	/* this+0xE8   */ private: int m_chRadiSpeed;
	/* this+0xEC   */ private: int m_isDisappear;
	/* this+0xF0   */ private: matrix m_matrix;
	/* this+0x120  */ private: matrix m_rotMat;
	/* this+0x150  */ private: unsigned long m_argb;
	/* this+0x154  */ private: unsigned long m_renderFlag;
	/* this+0x158  */ private: int m_any;
	/* this+0x15C  */ private: int m_type;
	/* this+0x160  */ private: int m_count;
	/* this+0x164  */ private: int m_chCnt;
	/* this+0x168  */ private: int m_pattern;
	/* this+0x16C  */ private: int m_stateCnt;
	/* this+0x170  */ private: int m_duration;
	/* this+0x174  */ private: int m_animSpeed;
	/* this+0x178  */ private: int m_fadeInCnt;
	/* this+0x17C  */ private: int m_fadeOutCnt;
	/* this+0x180  */ private: int m_numSegment;
	/* this+0x184  */ private: int m_validAngle;
	/* this+0x188  */ private: int m_RGBCycleCnt;
	/* this+0x18C  */ private: int m_ChangePoint;
	/* this+0x190  */ private: int m_totalTexture;
	/* this+0x194  */ private: int m_playWaveType;
	/* this+0x198  */ private: int m_notifyCnt[10];
	/* this+0x1C0  */ private: int m_RGBCycleDelay;
	/* this+0x1C4  */ private: int m_commonPattern;
	/* this+0x1C8  */ private: int m_red;
	/* this+0x1CC  */ private: int m_green;
	/* this+0x1D0  */ private: int m_blue;
	/* this+0x1D4  */ private: int m_redSpeed;
	/* this+0x1D8  */ private: int m_greenSpeed;
	/* this+0x1DC  */ private: int m_blueSpeed;
	/* this+0x1E0  */ private: unsigned char m_repeatAnim;
	/* this+0x1E4  */ private: float m_arcAngle;
	/* this+0x1E8  */ private: float m_minRadius;
	/* this+0x1EC  */ private: float m_rotAxis[3];
	/* this+0x1F8  */ private: float m_ChangeSpeed;
	/* this+0x1FC  */ private: float m_ChangeAccel;
	/* this+0x200  */ private: float m_ChangeSpeedx;
	/* this+0x204  */ private: float m_ChangeSpeedy;
	/* this+0x208  */ private: float m_ChangeSpeedz;
	/* this+0x20C  */ private: float m_ChangeAccelx;
	/* this+0x210  */ private: float m_ChangeAccely;
	/* this+0x214  */ private: float m_ChangeAccelz;
	/* this+0x218  */ private: float m_speed;
	/* this+0x21C  */ private: float m_accel;
	/* this+0x220  */ private: float m_ChangeWidthAccel;
	/* this+0x224  */ private: float m_ChangeWidthSpeed;
	/* this+0x228  */ private: float m_ChangeHeightSpeed;
	/* this+0x22C  */ private: float m_ChangeHeightAccel;
	/* this+0x230  */ private: float m_maxAlpha;
	/* this+0x234  */ private: float m_minAlpha;
	/* this+0x238  */ private: float m_u1;
	/* this+0x23C  */ private: float m_u2;
	/* this+0x240  */ private: float m_v1;
	/* this+0x244  */ private: float m_v2;
	/* this+0x248  */ private: float m_gravSpeed;
	/* this+0x24C  */ private: float m_gravAccel;
	/* this+0x250  */ private: float m_innerSize;
	/* this+0x254  */ private: float m_outerSize;
	/* this+0x258  */ private: float m_innerSpeed;
	/* this+0x25C  */ private: float m_outerSpeed;
	/* this+0x260  */ private: float m_innerAccel;
	/* this+0x264  */ private: float m_outerAccel;
	/* this+0x268  */ private: float m_longitude;
	/* this+0x26C  */ private: float m_latitude;
	/* this+0x270  */ private: float m_roll;
	/* this+0x274  */ private: float m_size;
	/* this+0x278  */ private: float m_sizeSpeed;
	/* this+0x27C  */ private: float m_sizeAccel;
	/* this+0x280  */ private: float m_alpha;
	/* this+0x284  */ private: float m_alphaSpeed;
	/* this+0x288  */ private: float m_alphaDelta;
	/* this+0x28C  */ private: float m_longSpeed;
	/* this+0x290  */ private: float m_latiSpeed;
	/* this+0x294  */ private: float m_rollSpeed;
	/* this+0x298  */ private: float m_longAccel;
	/* this+0x29C  */ private: float m_latiAccel;
	/* this+0x2A0  */ private: float m_rollAccel;
	/* this+0x2A4  */ private: float m_radius;
	/* this+0x2A8  */ private: float m_radiusSpeed;
	/* this+0x2AC  */ private: float m_radiusAccel;
	/* this+0x2B0  */ private: float m_widthSize;
	/* this+0x2B4  */ private: float m_widthSpeed;
	/* this+0x2B8  */ private: float m_widthAccel;
	/* this+0x2BC  */ private: float m_heightSize;
	/* this+0x2C0  */ private: float m_heightSpeed;
	/* this+0x2C4  */ private: float m_heightAccel;
	/* this+0x2C8  */ private: float m_maxHeightSize;
	/* this+0x2CC  */ private: mystd::vector<float> m_chPoint;
	/* this+0x2DC  */ private: mystd::vector<float> m_chVal1;
	/* this+0x2EC  */ private: mystd::vector<float> m_chVal2;
	/* this+0x2FC  */ private: mystd::vector<float> m_chVal3;
	/* this+0x30C  */ private: vector3d m_speed3d;
	/* this+0x318  */ private: vector3d m_orgPos;
	/* this+0x324  */ private: vector3d m_deltaPos;
	/* this+0x330  */ private: vector3d m_deltaPos2;
	/* this+0x33C  */ private: vector3d m_deltaPos3;
	/* this+0x348  */ private: vector3d m_deltaPosAccel;
	/* this+0x354  */ private: vector3d m_segPos[4];
	/* this+0x384  */ private: PrimSegment m_segment[50];
	/* this+0x1EDC */ private: RPTriFace m_rp[512];
	/* this+0xF6DC */ private: TeiEffect m_GI[4];

	//public: void CEffectPrim::CEffectPrim();
	//public: void CEffectPrim::~CEffectPrim();
	//public: void CEffectPrim::Init(class CRagEffect *, enum EFFECTPRIMID, struct vector3d);
	//public: unsigned char CEffectPrim::OnProcess();
	//public: void CEffectPrim::SendMsg(class CGameObject *, int, int, int, int);
	//public: void CEffectPrim::Render(struct matrix &);
	//private: void CEffectPrim::InitSegment();
	//private: void CEffectPrim::ShiftSegment();
	//private: unsigned char CEffectPrim::AnimMotion();
	//private: unsigned char CEffectPrim::AnimTexture();
	//private: void CEffectPrim::ProcessAlpha();
	//private: unsigned char CEffectPrim::Prim2DTexture();
	//private: unsigned char CEffectPrim::Prim2DTextureOrbit();
	//private: void Prim2DQuad();
	//private: void CEffectPrim::Prim2DFlash();
	//private: void CEffectPrim::Prim3DFlash();
	//private: void CEffectPrim::Prim2DCircle();
	//private: unsigned char CEffectPrim::Prim3DParticle();
	//private: unsigned char CEffectPrim::Prim3DParticleGravity();
	//private: unsigned char CEffectPrim::Prim3DParticleOrbit();
	//private: unsigned char CEffectPrim::Prim3DParticleSpline();
	//private: void CEffectPrim::Prim3DQuadHorn();
	//private: unsigned char CEffectPrim::Prim3DTexture();
	//private: void Prim3DTextureOrbit();
	//private: void Prim3DSpline();
	//private: void CEffectPrim::Prim3DSpiral();
	//private: void CEffectPrim::Prim3DCircle();
	//private: unsigned char CEffectPrim::Prim3DCylinder();
	//private: void CEffectPrim::Prim3DSphere();
	//private: void CEffectPrim::Prim3DQuadSquare();
	//private: unsigned char CEffectPrim::Prim3DCylinderHalf();
	//private: void CEffectPrim::Prim3DLine();
	//private: unsigned char CEffectPrim::Prim3DParticleNoMaster();
	//private: unsigned char CEffectPrim::Prim3DTextureNoMaster();
	//private: unsigned char CEffectPrim::Prim3DCasting();
	//private: unsigned char CEffectPrim::Prim3DCasting2();
	//private: unsigned char CEffectPrim::Prim3DCasting3();
	//private: unsigned char CEffectPrim::Prim3DCasting4();
	//private: unsigned char CEffectPrim::PrimMagnum2();
	//private: unsigned char CEffectPrim::PrimAsuraCasting();
	//private: void CEffectPrim::PrimHitLine();
	//private: unsigned char CEffectPrim::PrimHeal();
	//private: void CEffectPrim::PrimGuard();
	//private: void CEffectPrim::PrimSaintWing();
	//private: void CEffectPrim::PrimSphereWind();
	//private: void CEffectPrim::PrimColorPaper();
	//private: unsigned char CEffectPrim::PrimWind();
	//private: unsigned char CEffectPrim::PrimPortal();
	//private: unsigned char CEffectPrim::Prim3DAura();
	//private: unsigned char CEffectPrim::Prim3DAura_2();
	//private: void CEffectPrim::PrimWaterFallParticle();
	//private: unsigned char CEffectPrim::PrimLandProtector();
	//private: unsigned char CEffectPrim::PrimFoot();
	//private: void CEffectPrim::PrimGI1();
	//private: void CEffectPrim::PrimGI2();
	//private: void CEffectPrim::PrimGI3();
	//private: void CEffectPrim::PrimGI4();
	//private: void CEffectPrim::PrimGI5();
	//private: unsigned char CEffectPrim::PrimCHOOKGI();
	//private: unsigned char CEffectPrim::PrimCloud();
	//private: void CEffectPrim::PrimPokJuk();
	//private: void CEffectPrim::PrimBottom();
	//private: void CEffectPrim::PrimEffectTexture();
	//private: void CEffectPrim::PrimBottom2();
	//private: void CEffectPrim::PrimBottomOut();
	//private: unsigned char CEffectPrim::PrimGumGang();
	//private: void CEffectPrim::PrimGrandCross2();
	//private: void CEffectPrim::PrimSlash1();
	//private: void CEffectPrim::PrimRectUp();
	//private: void CEffectPrim::PrimRectUp2();
	//private: unsigned char CEffectPrim::PrimLineLink();
	//private: unsigned char CEffectPrim::PrimTripleAttack();
	//private: unsigned char CEffectPrim::PrimSakura();
	//private: void CEffectPrim::PrimMapPillar();
	//private: void CEffectPrim::PrimForest();
	//private: void CEffectPrim::PrimWaterFall();
	//private: void CEffectPrim::PrimLightSphere();
	//private: void CEffectPrim::PrimShieldBoomerang();
	//private: void CEffectPrim::PrimFirstAid();
	//private: void CEffectPrim::PrimThrowItem();
	//private: void CEffectPrim::PrimIntimidate();
	//private: void CEffectPrim::PrimTeiHit1();
	//private: void CEffectPrim::PrimTeiHit2();
	//private: unsigned char CEffectPrim::PrimChimTo();
	//private: unsigned char CEffectPrim::PrimGhost();
	//private: unsigned char CEffectPrim::PrimSuperAngel();
	//private: unsigned char CEffectPrim::PrimBottomSpr();
	//private: void CEffectPrim::PrimChemical();
	//private: void CEffectPrim::PrimChemical2();
	//private: void CEffectPrim::PrimCallZone();
	//private: void CEffectPrim::PrimTeleportation2();
	//private: void CEffectPrim::PrimParticleUp();
	//private: void CEffectPrim::PrimBlind();
	//private: void CEffectPrim::PrimPoison();
	//private: void CEffectPrim::PrimSoulBreaker();
	//private: void CEffectPrim::PrimPressure();
	//private: void CEffectPrim::PrimBash3D();
	//private: void CEffectPrim::PrimGroundShake();
	//private: void CEffectPrim::Render2DQuad();
	//private: void CEffectPrim::Render2DFlash();
	//private: void CEffectPrim::Render2DCircle();
	//private: void CEffectPrim::Render2DTexture();
	//private: void CEffectPrim::Render3DFlash(struct matrix &);
	//private: void CEffectPrim::Render3DCircle(struct matrix &);
	//private: void CEffectPrim::Render3DSphere(struct matrix &);
	//private: void CEffectPrim::Render3DSegment(struct matrix &);
	//private: void CEffectPrim::Render3DTexture(struct matrix &);
	//private: void CEffectPrim::Render3DTextureBillboard(struct matrix &);
	//private: void CEffectPrim::Render3DQuadHorn(struct matrix &);
	//private: void CEffectPrim::Render3DCylinder(struct matrix &);
	//private: void CEffectPrim::Render3DParticle(struct matrix &);
	//private: void CEffectPrim::Render3DQuadSquare(struct matrix &);
	//private: void CEffectPrim::Render3DCrossTexture(struct matrix &);
	//private: void CEffectPrim::Render3DLine(struct matrix &);
	//private: void CEffectPrim::Render3DCasting(struct matrix &);
	//private: void CEffectPrim::Render3DCasting_LowPolygon(struct matrix &);
	//private: void CEffectPrim::RenderMagnum2(struct matrix &);
	//private: void CEffectPrim::Render3DCasting2(struct matrix &);
	//private: void CEffectPrim::RenderGuard(struct matrix &);
	//private: void CEffectPrim::RenderSaintWing(struct matrix &);
	//private: void CEffectPrim::RenderSphereWind(struct matrix &);
	//private: void CEffectPrim::RenderColorPaper(struct matrix &);
	//private: void CEffectPrim::RenderWind(struct matrix &);
	//private: void CEffectPrim::Render3DAura(struct matrix &);
	//private: void CEffectPrim::Render3DAura_2(struct matrix &);
	//private: void CEffectPrim::RenderAsuraCasting(struct matrix &);
	//private: void CEffectPrim::RenderHitLine(struct matrix &);
	//private: void CEffectPrim::RenderCHOOKGI(struct matrix &);
	//private: void CEffectPrim::RenderCloud(struct matrix &);
	//private: void CEffectPrim::RenderGumGang(struct matrix &);
	//private: void CEffectPrim::RenderGrandCross2(struct matrix &);
	//private: void CEffectPrim::RenderSlash1(struct matrix &);
	//private: void CEffectPrim::RenderRectUp(struct matrix &);
	//private: void CEffectPrim::RenderRectUp2(struct matrix &);
	//private: void CEffectPrim::RenderLineLink(struct matrix &);
	//private: void CEffectPrim::RenderTripleAttack(struct matrix &);
	//private: void CEffectPrim::RenderForest(struct matrix &);
	//private: void CEffectPrim::RenderWaterFall(struct matrix &);
	//private: void CEffectPrim::RenderLightSphere(struct matrix &);
	//private: void CEffectPrim::RenderIntimidate(struct matrix &);
	//private: void CEffectPrim::RenderTeiHit1(struct matrix &);
	//private: void CEffectPrim::RenderBottom2(struct matrix &);
	//private: void CEffectPrim::RenderPokJuk(struct matrix &);
	//private: void CEffectPrim::RenderChemical(struct matrix &);
	//private: void CEffectPrim::RenderBash3D(struct matrix &);
	//private: void CEffectPrim::RenderChemical2(struct matrix &);
	//private: void CEffectPrim::RenderCallZone(struct matrix &);
	//private: void CEffectPrim::RenderBlind(struct matrix &);
	//private: void CEffectPrim::RenderPoison(struct matrix &);
	//private: void CEffectPrim::RenderSoulBreaker(struct matrix &);
	//private: void CEffectPrim::Get_Angle(float, float, short *);
	//private: void CEffectPrim::GuardPoint(int, int, float, float, float, float, struct vector3d &, struct vector3d &);
	//private: void CEffectPrim::RenderTeiRect(int *, short, struct vector3d, struct vector3d, struct vector3d, struct vector3d, struct matrix &, short, char, char, unsigned char, unsigned char, unsigned char, float, float);
	//private: void CEffectPrim::RenderTeiRect(int *, int, short, short, struct vector3d, struct vector3d, struct vector3d, struct vector3d, struct matrix &);
	//private: void CEffectPrim::Tei_TowardScreen(struct vector3d &, struct vector3d &, struct vector3d &, struct vector3d &, short, short);
	//private: void CEffectPrim::Tei_TowardScreen2(struct vector3d &, struct vector3d &, struct vector3d &, struct vector3d &, short, short);
	//private: void CEffectPrim::RenderTei2DRect(int *, short, float, float, float, float, struct matrix &, char, unsigned char, unsigned char, unsigned char);
};
